﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package org.aswing {
    import flash.display.*;
    import org.aswing.plaf.basic.*;

    public class JButton extends AbstractButton {

        public function JButton(_arg1:String="", _arg2:Icon=null){
            super(_arg1, _arg2);
            setName("JButton");
            setModel(new DefaultButtonModel());
        }
        public function isDefaultButton():Boolean{
            var _local1:JRootPane = getRootPaneAncestor();
            if (_local1 != null){
                return ((_local1.getDefaultButton() == this));
            };
            return (false);
        }
        override public function wrapSimpleButton(_arg1:SimpleButton):AbstractButton{
            mouseChildren = true;
            drawTransparentTrigger = false;
            setShiftOffset(0);
            setIcon(new SimpleButtonIcon(_arg1));
            setBorder(null);
            setMargin(new Insets());
            setBackgroundDecorator(null);
            setOpaque(false);
            setHorizontalTextPosition(AsWingConstants.CENTER);
            setVerticalTextPosition(AsWingConstants.CENTER);
            return (this);
        }
        override public function updateUI():void{
            setUI(UIManager.getUI(this));
        }
        override public function getDefaultBasicUIClass():Class{
            return (BasicButtonUI);
        }
        override public function getUIClassID():String{
            return ("ButtonUI");
        }

    }
}//package org.aswing 
